package com.example.shirodemo.service;

import com.example.shirodemo.controller.vo.MenuVo;
import com.example.shirodemo.dto.ResponseResult;
import com.example.shirodemo.dto.ResponseResultPage;
import com.example.shirodemo.entity.SMenu;

/**
 * @Author 绫小路
 * @Date 2021/1/11
 */
public interface AdminService {

  /**
   * 获取角色列表
   *
   * @param search
   * @param page
   * @param limit
   * @return
   */
  ResponseResultPage getRoleLists(String search, int page, int limit);

  /**
   * 添加角色
   *
   * @param name
   * @param description
   * @return
   */
  ResponseResult addRole(String name, String description);

  /**
   * 删除角色
   *
   * @param name
   * @return
   */
  ResponseResult deleteRole(String name);

  /**
   * 编辑角色
   *
   * @param name
   * @param description
   * @return
   */
  ResponseResult editRole(Integer id, String name, String description);

  public ResponseResult getAllMenu();

  public SMenu menuInfo(Integer id);

  public ResponseResult updateMenu(MenuVo menuVo);

  public ResponseResult addMenu(MenuVo menuVo);

  public ResponseResult deleteMenu(Integer id);

  public ResponseResult roleMenu(int roleId);

  public ResponseResult roleAddMenu(Integer roleId, String ids);

  public ResponseResultPage getUserList(Integer page, Integer limit, String search);

  public ResponseResult getUserRoleVo(Integer userId);

  public ResponseResult updateUserRole(Integer userId, String ids);

  public ResponseResult getSwaggerApiList();

  public ResponseResultPage getPermissionList(String search, int page, int limit);

  public ResponseResult addPermission(String url, String method, String description);

  public ResponseResult deletePermission(Integer id);

  public ResponseResult updatePermission(Integer id, String url, String method, String description);

  public ResponseResultPage getRolePermission(Integer roleId, String search, int page, int limit);

  public ResponseResult updateRolePermission(Integer roleId,String ids,Boolean checked);
}
